package com.hackerrank.challenges.digitalcameradayornight;

import java.util.Scanner;

public class Solution {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int dn = 0, tn = 0;
		while(in.hasNext()) {
			String line = in.nextLine();
			for(String rgb : line.split(" ")) {
				String c[] = rgb.split(",");
				int r = Integer.parseInt(c[0]), g = Integer.parseInt(c[1]), b = Integer.parseInt(c[2]);
				if(r < 64 && g < 64 && b < 64)
					dn++;
				tn++;
			}
		}
		if(dn > tn * 0.5)
			System.out.println("night");
		else
			System.out.println("day");
	}
}
